<?php
//error_reporting(0);
//print_r($_REQUEST);

require_once("class.persister.php");
set_time_limit(50); 
$val=$_REQUEST['option'];
if($_REQUEST['option2'])                                  
{
foreach ($_REQUEST['option2'] as $opt)
{
	$val2=$opt;
}
}

if($_REQUEST['option3'])
{
foreach ($_REQUEST['option3'] as $opt)
{
 $val3=$opt;
}
        
}

		  $option=array($val);
		  if (!empty($val2))
		  $option[]=$val2;
		  if (!empty($val3))
		  $option[]=$val3;
		  
$exclue=(array_key_exists('exclude',$_REQUEST))?$_REQUEST['exclude']:null;
$inclue=(array_key_exists('include',$_REQUEST))?$_REQUEST['include']:null;
$con_city_cod=(array_key_exists('con_city_cod',$_REQUEST))?$_REQUEST['con_city_cod']:null;
$alt=$_REQUEST['alt'];
$sid=$_REQUEST['sid'];
$adt=$_REQUEST['adt'];
$chd=$_REQUEST['chd'];
$inf=$_REQUEST['inf'];
$config_id=$_REQUEST['config_id'];
$airline_option=$_REQUEST['airline_option'];
$status=$_REQUEST['status'];
if($_REQUEST['button']=='update')
{
	$per= new request(array($adt,$chd,$inf),$option,$inclue,$exclue,$alt,$sid,$config_id,$airline_option,$_REQUEST['request_id'],$status,$con_city_cod);	
}
else
{
	$per= new request(array($adt,$chd,$inf),$option,$inclue,$exclue,$alt,$sid,$config_id,$airline_option,null,$status,$con_city_cod);
   
}


?>